package pers.xiaoliang.concurrency.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import pers.xiaoliang.concurrency.example.immutable.RequestHolder;

/**
* @description: 本地线程控制器
* @author: xiaoliang.liu
* @date: 2018/7/28 16:35
* @version v1.0
*/
@Slf4j
@Controller
@RequestMapping("thread")
public class ThreadLocalController {

    @ResponseBody
    @GetMapping("test")
    public Long testThreadLocal() {
        return RequestHolder.get();
    }
}
